package high.concurrent.pay.template.paycallback;

import high.concurrent.pay.factory.PayCallbackFactory;
import high.concurrent.pay.template.PayCallbackAbstractTemplate;
import high.concurrent.vo.PayInfoVO;

import java.util.List;

/**
 * 支付抽象类的子类
 */
public class PayCallbackChildImpl extends PayCallbackAbstractTemplate {

    private PayCallbackFactory payCallbackFactory = new PayCallbackFactory();

    public PayCallbackChildImpl(PayInfoVO payInfoVO) {
        super(payInfoVO);
    }

    @Override
    public List<String> toBeSend(PayInfoVO payInfoVO) {
        return payCallbackFactory.toBeSend(payInfoVO);
    }

    @Override
    public void updateLocalTransaction(PayInfoVO payInfoVO) {
        payCallbackFactory.updateLocalTransaction(payInfoVO);
    }

    @Override
    public void hasBeenSent(List<String> messageIds) {
        payCallbackFactory.hasBeenSent(messageIds);
    }
}
